package ${package.Entity};

<#-- 初始化标记变量 -->
<#assign needLocalDate = false>
<#assign needLocalDateTime = false>

<#-- 循环所有字段，检测是否需要日期类型导入 -->
<#list table.fields as field>
    <#if field.propertyType??>
        <#if field.propertyType == "LocalDate">
            <#assign needLocalDate = true>
        </#if>
        <#if field.propertyType == "LocalDateTime">
            <#assign needLocalDateTime = true>
        </#if>
    </#if>
</#list>
import cn.com.blueInfo.bpm.common.entity.BaseEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
<#-- 动态添加日期类型导入 -->
<#if needLocalDate>
import java.time.LocalDate;
</#if>
<#if needLocalDateTime>
import java.time.LocalDateTime;
</#if>

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * ${table.comment!}
 * @author ${author}
 * @since ${date}
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("${table.name}")
@Schema(description = "${table.comment!}")
public class ${entity} extends BaseEntity {

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    /** ${field.comment!} */
    <#if field.keyFlag>
    @TableId(type = IdType.INPUT)
    </#if>
    @Schema(description = "${field.comment!}")
    private ${field.propertyType} ${field.propertyName};
</#list>

<#------------  END 字段循环遍历  ---------->
}
